package com.wz.jiangsu.main.test;

public class a {
    public static void main(String[] args) {
        Proxy proxy = new Proxy();
        proxy.study();
    }
}

interface stu{
    void study();
}
class Studenπt implements stu{

    @Override
    public void study() {
        System.out.println("学生学习");
    }
}

class Proxy implements stu{
    private stu stu;
    @Override
    public void study() {
        if (stu == null) {
            stu = new Studenπt();
        }
        System.out.println("代理类前置处理");
        stu.study();
        System.out.println("代理类后置处理");
    }
}
